package jack.newbee.mall.dao;

import jack.newbee.mall.entity.MallUser;
import jack.newbee.mall.util.PageQueryUtil;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MallUserMapper {

    //delete
    int deleteByPrimaryKey(Long userId);


    //insert
    int insert(MallUser record);

    int insertSelective(MallUser record);


    //select one
    MallUser selectByPrimaryKey(Long userId);

    MallUser selectByLoginName(String loginName);

    MallUser selectByLoginNameAndPasswd(@Param("loginName") String loginName,
                                        @Param("password") String password);

    //update
    int updateByPrimaryKeySelective(MallUser record);

    int updateByPrimaryKey(MallUser record);

    //select multi
    List<MallUser> findMallUserList(PageQueryUtil pageUtil);

    int getTotalMallUsers(PageQueryUtil pageUtil);

    //update
    int lockUserBatch(@Param("ids") Long[] ids, @Param("lockStatus") int lockStatus);


}
